/*
 * Implement an algorithm to delete a node in the middle of a single linked list,
 * given only access to that node
 * EXAMPLE
 * Input: the node 'c' from the linked list a->b->c->d->e
 * Result: nothing is returned, but the new linked list looks like a->b->d->e
 */
package Chapter2;

public class Chapter2_3 {
	public void removeMiddle(MyLinkedListNode node)
	{
		if(node == null || node.Next == null) return;
		
		node.value = node.Next.value;
		node.Next = node.Next.Next;
	}
}
